package com.xunfeiai.client;

import com.xunfeiai.core.XunfeiAIService;

import java.util.Scanner;

public class XunfeiAiBot {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入API Password：");
        String apiPass = sc.nextLine();
        XunfeiAIService service = new XunfeiAIService(apiPass);
        System.out.println("请开始提问（输入bye结束）：");
        System.out.println(">>>");
        String q = sc.nextLine();
        while (!q.equalsIgnoreCase("bye")) {
            String ret = service.askSpark(q);
            System.out.println(ret);
            System.out.println(">>>");
            q = sc.nextLine();
        }

        sc.close();
    }
}
